package Five;

public class PersonOverride {
	private String name;
	private boolean gender;
	private int age;

	public PersonOverride(String name, int age, boolean gender) {
		this.name = name;
		this.age = age;
		this.gender = gender;
	}

	public boolean equals(PersonOverride obj) {
		PersonOverride other = (PersonOverride) obj;
		if (age != other.age)
			return false;
		if (gender != other.gender)
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		return true;
	}

	public String toString() {
		return name + "-" + age + "-" + gender;
	}

	public PersonOverride() {
		this("default", 1, true);
	}
}
